package com.ccy_blog.base.exception;

public enum BlogEnum {

    //第一个001:用户登录模块 第二个001:登录中验证码错误情况
    USER_LOGIN_CODE("001-001","验证码输入错误"),
    USER_LOGIN_ACCOUNT("001-002","用户名或者密码错误"),
    USER_REGISTER_ACCOUNT("001-002","注册失败"),
    USER_VERIFY_PASS("001-003","输入的旧密码错误"),
    USER_UPDATE("001-004","输入的旧密码错误"),
    ARTICLE_ISOPEN("002-001","修改文章是否公开失败"),
    ARTICLE_PUNISH("002-002","发布文章失败"),
    ARTICLE_UPDATE("002-003","修改文章失败"),
    ARTICLE_DELETE("002-004","删除文章失败"),
    NOTICE_ISOPEN("003-001","修改公告是否公开失败"),
    NOTICE_PUNISH("003-002","发布公告失败"),
    NOTICE_UPDATE("003-003","修改公告失败"),
    NOTICE_DELETE("003-004","删除公告失败"),
    COMMENT_ISOPEN("004-001","修改评论是否公开失败"),
    COMMENT_PUNISH("004-002","发布评论失败"),
    COMMENT_UPDATE("004-003","修改评论失败"),
    COMMENT_DELETE("004-004","删除评论失败");


    private String typeCode;//属于哪个模块下的操作失败code
    private String message;//具体错误消息

    BlogEnum(String typeCode, String message) {
        this.typeCode = typeCode;
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }
}
